<?php


use support\Response;

if (!function_exists("jsonRe")) {
    function jsonRe(array $data = [], int $code = 200, string $message = "成功"): Response
    {
        return json([
            "code" => $code,
            "status" => $code === 200,
            "message" => $message,
            "data" => $data,
            "timestamp" => time(),
        ]);
    }
}
